<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="com.mysql.cj.jdbc.ha.BalanceStrategy"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%request.setCharacterEncoding("UTF-8"); %>
<%@page import="java.sql.*" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>支付</title>
    <link rel="stylesheet" href="./css/left-nav.css">
    <link rel="stylesheet" href="./css/right-card.css">
    <link rel="stylesheet" href="./css/balance.css">
    <link rel="stylesheet" href="./css/common.css">
    <style type="text/css">
    	.right .right_card {
    		background: url(https://images-1300275660.cos.ap-shanghai.myqcloud.com/%E5%9C%B0%E7%90%83.jpg) no-repeat center;
		    background-color: rgb(46,45,62);
		    background-size:cover;
		    opacity:0.8;
		    border-radius: 20px;
		}
		.right .right_card ul .manage button{
		    width: 400px;
		    height: 50px;
		    background-color:#5D5FD1;
		    font-size: 25px;
		    font-weight: 450;
		    border-style: none;
		    border-radius: 5px;
		    color: white;
		    margin-top: 50px;
		}
    </style>
</head>
<body>
<!-- 选择支付方式后的结果页面 -->
<!-- 左侧导航 -->
    <div class="left_nav" id="nav_left">
        <div class="head clearfix">
            <div class="head_icon"></div>
            <div class="head_word"><a href="home.jsp">返回首页</a></div>
        </div>
        <ul>
            <li>
                <span class="third_icon"></span>
                支付方式
            </li>           
        </ul>
    </div>

    <!-- 右侧内容 -->
    <div class="right">
        <div class="right_card">

            <ul id="content_right">                

                <!-- 支付方式 -->
                <li class="item pay manage" id="pay_type">
                    <div class="title">支付成功</div>
					
                 	<%
                 		//取得用户输入的数据
                 		String payAmount = String.valueOf(session.getAttribute("payAmount"));
						String payType = String.valueOf(session.getAttribute("payType"));
						String payDays = String.valueOf(session.getAttribute("payDays"));
						String today = String.valueOf(session.getAttribute("today"));
						String dueDate = String.valueOf(session.getAttribute("dueDate"));
                 		if(payType.equals("no")){
                			out.print("<script type='text/javascript'>alert('请选择一款一种付款方式！');</script>");
                			response.setHeader("Refresh","0.1;url=home.jsp");
                		}
                 		
                 	%>
                 		<div class="result">
	                 		<%
	                 			out.print("您于"+today+"通过"+payType+"选择了"+payAmount+"元,<br>"+"为期"+payDays+"天的分期支付,<br>"+"请在"+dueDate+"之前完成还款！");
	                 		%>
	                 		<form action="payList.jsp">
								<button>点击查看所有付款记录</button>
							</form>
	                 		<div class="resultImg">
	                 			<img src="https://images-1300275660.cos.ap-shanghai.myqcloud.com/money4.png">
	                 		</div>
                 		</div>
                </li>              
            </ul>
        </div>
    </div>
</body>
<script type="text/javascript">
	window.onload = function(){
		document.getElementById("pay_type").style.display = "block";
	}
</script>
</html>